<!--
Date: 2025-08-13
Copyright (c) 2025 Industrial Software Feature Database
-->
<template>
  <el-dialog  v-if="props.fileVisible" v-model="props.fileVisible" title="被过滤的文件" width="1200px" append-to-body :before-close="closeDialog">
    <div>
      <div class="description">
        除满足以下条件的数据将自动被移除：<br>
        1.根目录下以“Model”开头的文件名将放入到“全机”文件类型中。<br>
        2.根目录下以第二个“_”+“S”命名的文件将根据部段的命名规则放入到对应部段文件类型中。<br>
        3.“P_load”文件夹的文件将放入到“气密卡”文件类型中。<br>
        4.只存入.dat、.out、.bdf类型的文件，其余格式文件将自动剔除。
      </div>
      <el-table
        ref="modelTableRef"
        v-loading="loading"
        :data="props.filterFiles"
        row-key="id"
      >
        <el-table-column type="index" width="50" />
        <el-table-column prop="fileName" align="left" label="文件名称"></el-table-column>
        <el-table-column prop="fileSize" label="文件大小（KB）"></el-table-column>
        <el-table-column prop="fileType" align="left" label="文件类型"></el-table-column>
        <el-table-column prop="fileUrl" label="所属文件路径"></el-table-column>
      </el-table>
    </div>
    <template #footer>
      <div class="dialog-footer" style="text-align: center;">
        <el-button type="primary" @click="closeDialog">关闭窗口</el-button>
      </div>
    </template>
  </el-dialog>
</template>

<script setup name="FilterFiles">
const emit = defineEmits(['handleEvent']);
const loading = ref(false);
const props = defineProps(['filterFiles', 'fileVisible']);
const treeData = ref([]);
const modelNumber = ref('');
const batchNumber = ref('');
const closeDialog = () => {
  emit('handleEvent', {type: 'cancelFileShow'});
};
</script>

<style lang="scss" scoped>
</style>
